package com.jxb.myshop.services.impl;

import com.jxb.myshop.common.ResponseResult;
import com.jxb.myshop.dao.ItemDao;
import com.jxb.myshop.dao.impl.ItemDaoImpl;
import com.jxb.myshop.entity.vo.ItemVo;
import com.jxb.myshop.services.ItemServices;

import java.util.List;

public class ItemServicesImpl implements ItemServices {
    private ItemDao id = new ItemDaoImpl();

    @Override
    public ResponseResult getItemAndProduct(String oid) {
        try {
            List<ItemVo> itemVoList =  id.getItemAndProduct(oid);
            if (itemVoList != null) {
                return ResponseResult.createSuccess(itemVoList);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ResponseResult.createFail("获取失败");
    }
}
